home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Resource ƒ / Syslog Component ƒ / ShowInitIcon.c < prev    next >
Encoding:
Text File  |  1995-10-25  |  5.7 KB  |  52 lines  |  [TEXT/SPM ]

  1. /*
  2.     ShowInitIcon - version 1.0, May 11th, 1995
  3.     This code is intended to let INIT writers easily display an icon at startup time.
  4.     View in Geneva 9pt, 4-space tabs
  5.  
  6.     Written by: Peter N Lewis <peter@mail.peter.com.au>, Jim Walker <JWWalker@aol.com>
  7.     and François Pottier <pottier@dmi.ens.fr>, with thanks to previous ShowINIT authors.
  8.     Send comments and bug reports to François Pottier.
  9.     
  10.     This version features:
  11.     - Short and readable code.
  12.     - Correctly wraps around when more than one row of icons has been displayed.
  13.     - works with System 6
  14.     - Built with Universal Headers & CodeWarrior. Should work with other headers/compilers.
  15. */
  16.  
  17. #include "ShowInitIcon.h"
  18.  
  19. #include <Resources.h>
  20. #include <Icons.h>
  21. #include <OSUtils.h>
  22. #include <LowMem.h>
  23.  
  24. // You should set SystemSixOrLater in your headers to avoid including glue for SysEnvirons.
  25.  
  26. // Set this flag to 1 if you want to compile this file into a stand-alone resource (see note below).
  27. // Set it to 0 if you want to include this source file into your INIT project.
  28.  
  29. #if he mask.
  30.         CopyBits(&source, &destination, &source.bounds, iconRect, srcBic, nil);
  31.                                                         // Then the icon.
  32.         source.baseAddr = *icon;
  33.         CopyBits(&source, &destination, &source.bounds, iconRect, srcOr, nil);
  34.     }
  35. }
  36.  
  37. /*
  38.     Notes
  39.     
  40.     Checking for PlotIconID:
  41.         We (PNL) now check for system 7 and colour QD, and use colour graf ports and PlotIconID only if both are true
  42.         Otherwise we use B&W grafport and draw using PlotBWIcon.
  43.     
  44.     68k Struct Padding:
  45.         I (DHN) added the padding stuff to ensure that everything pads well when building for the PPC.  I have been bitten
  46.         already by a non-padded structure that didn't work on a PPC that did on a 68k Mac, so I use the padding religiously now.
  47.     
  48.     
  49. */
  50.  
  51.  
  52.